home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / systems / mac / textures / graphics / BoxedEPS.sea.hqx / Boxed EPS / BoxedEPS.doc next >
Text File  |  1993-01-23  |  34KB  |  867 lines

  1.  
  2.   
  3.  
  4.  **************************************************************
  5.  
  6.             ********* BoxedEPS.tex *********
  7.  
  8.               by  Larry Siebenmann 1989-92
  9.  
  10.          Distributed versions: Jan 1991 to September 1992
  11.  
  12.  
  13.  **************************************************************
  14.  
  15.                --- THE DOCUMENTATION ---
  16.                
  17.  
  18.  %%%  SOMMAIRE: BoxedEPS.tex d\'efinit des macro-commandes
  19.   %%    qui permettent d'int\'egrer dans un document TeX des
  20.   %%    objets graphiques d\'ecrits par fichier de norme EPSF,
  21.   %%    tout en accordant a chacun le statut d'une bo\^ite TeX ayant
  22.   %%    les bonnes dimensions.  La (seule!) contribution unique
  23.   %%    de ce fichier est de faire cela d'une fa{\c}con universelle.
  24.   %%    C'est a dire de fa{\c}con \`a pouvoir commod\'ement
  25.   %%    servir avec tout pilote d'imprimante de norme
  26.   %%    PostScript --- malgr\'e l'absence d'une norme
  27.   %%    pour \special.
  28.   %%
  29.  
  30.  --------------------
  31.         Urgent OzTeX note May 1992.  Henceforth the command
  32. \SetOzTeXEPSFSpecial serves versions >= 1.42 of OzTeX which
  33. provides screen preview of EPS files containing PICT resources.  If
  34. you still use a version <= 1.41 of OzTeX, you will now have to use
  35. the command \SetPSprintEPSFSpecial to get original performance. 
  36. OzTeX updates are posted on  ftp  midway.uchicago.edu.
  37.  --------------------
  38.  
  39.         BoxedEPS.tex, a highly portable package for insertion of EPSF
  40. (Encapsulated PostScript Files) in TeX documents. It is a fraction
  41. of a larger less portable package for several graphics norms on the
  42. Mac (see BoxedArt.tex below) that was initially put together for
  43. the GUTenberg special year for graphics, 1989.
  44.  
  45.         PostScript is currently the unchallenged high performance
  46. standard for electronic specification and typesetting of printed
  47. graphics, while TeX is the unchallenged high performance standard for
  48. the specification and typesetting of scientific manuscripts, minus
  49. graphics. The convenient integration of PostScript graphics in TeX
  50. manuscripts is clearly vital to the scientific publication process.
  51. BoxedEPS.tex is a link in the integration chain.
  52.  
  53.         The main task of BoxedEPS.tex is to make EPSF's (Encapsulated
  54. PostScript Files) behave for the TeX user like big characters or boxes. In
  55. contrast, the \special command, the TeX primitive through which such
  56. integration is normally accomplished, makes EPSF's behave like
  57. dimensionless points. This is Knuth's recommendation, because that
  58. permits TeX to typeset without any knowledge of the graphics file. The
  59. boxlike behavior is obviously more desirable from the user's point of view,
  60. and in the case of the EPSF norm, it is attainable because TeX is clever
  61. enough to be able to read the EPSF file to extract the dimensions of the
  62. bounding box of the graphics object described; they are normally located in
  63. a comment line beginning "%%Bounding Box:" somewhere before a line
  64. beginning "%%EndComments".
  65.  
  66.         There are other packages that do the same essential job,
  67. notably psfig of Trevor Darrell(1987), and T. Rokicki's "epsf.tex" for
  68. his driver "dvips", but differences remain. This one is built above all
  69. for portability and hence makes LOWEST-COMMON-DENOMINATOR
  70. requirements on the driver. It should be easy to understand to the
  71. point that with a bit of luck, a texpert will be able to port it to a
  72. new driver in a few minutes. It does provide a few useful things
  73. that others may not, eg. box fitting, and ready-made adaptation
  74. to a great many drivers.
  75.  
  76.         It is well known that, in a spirit of self reliance, texperts
  77. tend to do adhoc programming to integrate their graphics. See for
  78. example N. Jungers' <EDITEX@BUCLLN11.BITNET> posting on the
  79. GUTenberg bulletin board dated 17 November 1990 for a good
  80. explanation of the principles. A bit of understanding of TeX and
  81. PostScript programming can go a long way. If this is your
  82. inclination, perusal of Trevor Darrell psfig package is also highly
  83. recommended.
  84.  
  85.         It seems to me there is room for packages which require no
  86. tinkering with any programming language --- whether it be for
  87. everyday use or for porting --- even at the cost of being 
  88. heavier. Most users have neither time nor taste for more
  89. adventurous approaches.
  90.  
  91.          The basic requirement of BoxedEPS.tex is a
  92. "dvi-to-PostScript" printer driver that for EPSF graphics
  93. implements in one way or another Knuth's \special protocol. This
  94. \special should implement scaling in some form since TeX cannot
  95. provide it.  But translation (=pushing the graphics around) can be
  96. done by TeX, which is fortunate since some drivers (e.g. Textures'
  97. driver) do not bother to provide a \special command executing
  98. translations.
  99.  
  100.         Until a standard for \special integration of EPSF's is well
  101. established, users of BoxedEPS.tex will have to initialize the
  102. integration process using a driver-specific command of the form:
  103. \Set...EPSFSpecial. For example, \SetOzTeXEPSFSpecial will
  104. initialize for the driver used by the public domain OzTeX on Macintosh
  105. computers. (See a list of current alternatives below.)
  106.  
  107.        Then, the primary command
  108.  
  109.         \BoxedEPSF{<filename> scaled <scale in mils>}
  110.  
  111. scales by <scale in mils> the graphics object in the file <filename>
  112. and inserts it at the current ".dvi" insertion point as a TeX box of the
  113. dimensions of the bounding box scaled again by <scale in mils>.  A
  114. tiny EPSF test file gdisk.eps given below will let you run trials.
  115. (Beware that in 1991 many TeX screen previewers are unable to let
  116. you see the graphics; but any printer of the PostScript norm will let
  117. you run tests.)
  118.  
  119.   ---  <filename>  A file specification. This may be a simple
  120. filename in case the file is in the default directory for TeX. More
  121. generally, it can be a file pathname. Better, one can separately
  122. specify the directory that will be the directory in which TeX looks
  123. thereafter for simple EPSF file names, by typing
  124.  
  125.         \SetEPSFDirectory{<directory pathname>}
  126.  
  127. For example, on a Macintosh,
  128. \SetEPSFDirectory{HardDisk:MyArtFolder:} will direct TeX to the
  129. folder MyArtFolder of the volume HardDisk. And
  130. \SetEPSFDirectory{:YourArtFolder:} will direct TeX to the subfolder
  131. YourArtFolder of the directory that is the default directory for TeX.
  132. Similarly for unix systems but with "/" in place of ":".
  133.  
  134.         Spaces in filenames or directory names are strictly forbidden
  135. (usually already by TeX and drivers); this package gives a warning.
  136.  
  137.         For greater portability, use in filenames and directory names
  138. only letters, digits, and the period "." . And beware of conversions
  139. and confusions between upper and lower case letters.
  140.  
  141.         [[To experts: On an experimental basis, current versions of
  142. BoxedEPS.tex are a bit more liberal in allowing five punctuation marks
  143. punctuation: .:,;?! and also any character that has catcode 11
  144. (=letter) or 12 (=other). The backslash is used as a directory separator
  145. in the PC world; thus BoxedEPS.tex lets one use backslash provided
  146. backslash is coded as \\ inside the arguments of \SetEPSFDirectory{...}
  147. and \BoxedEPSF{...}.  I have been told that the slash / can
  148. often replace backslash in the MSDOS world, so this backslash feature
  149. may not be essential.  This \\ is of course a marco; one can 
  150. hopefully use other TeX macros in these arguments provided they 
  151. expand under \edef without mishap.]]
  152.  
  153.   ---  scaled <scale in mils>  Optional. To conform to TeX syntax,
  154. and avoid decimals most of the time, the scale is specified in mils
  155. (=thousand'ths), rather than as a positive real number. (If you are a
  156. precision freak, don't hesitate to add decimal parts of a mil.)
  157.  
  158.         If you specify no scale you get a default scale. This default
  159. scale can be changed from its initial value of 1000 (for the rest of
  160. the .tex file) by the command
  161.  
  162.         \SetDefaultEPSFScale{<scale in mils>}
  163.  
  164.         The scaling you select (however you do so) will always
  165. be corrected by the TeX magnification factor.  Thus if you select
  166. scaling by 1000 mils at \magstep1 you in reality get scaling to 1200
  167. mills on the printed paper.
  168.  
  169.         There is a rather different way to specify scaling (championed
  170. notably by Trevor Darrell since 1987); one can force width or height
  171. to a specified dimension, by one (not both) of the commands:
  172.  
  173.         \ForceWidth{<dimen>}
  174.         \ForceHeight{<dimen>}
  175.  
  176. This must precede the figure and normally applies to it alone.  Any
  177. such command takes precedence over any scaling command that
  178. might be present. If you have two such commands, the last takes
  179. precidence.
  180.  
  181.      This forcing will persist indefinitely if you type
  182.  
  183.   \ForceOn
  184.  
  185. and can then be stopped by 
  186.  
  187.   \ForceOff
  188.  
  189.      As W. Neumann pointed out to me, there are some unique uses for
  190. this "forced" dimensioning, for example:
  191.  
  192.  a)  To force neighboring figures to the same height or width.
  193.  
  194.  b)  To maintain the exact same height for a figure through
  195. minor revisions after TeX pagebreaks have been fixed.
  196.  
  197. Incidentally, note that \ForceWidth{0.66\hsize} is perfectly
  198. legitimate; similarly for all dimension specifications.
  199.  
  200.         On the other hand, scaling is the only right approach if you
  201. have a well proportioned line diagram with included labelling of a
  202. known point size. You scale to make the labels of optimal size.
  203.  
  204.         In actual practice (notably on Macintosh computers), the
  205. Bounding Box posted in the EPSF file is often not what it should be,
  206. namely the least rectangle containing the ink that will print the
  207. graphic object; it tends to be somewhat larger. Thus, tools are provided
  208. to correct the box to fit the object.
  209.  
  210.         For diagnostic purposes, one has:
  211.  
  212.         \ShowDisplacementBoxes, \HideDisplacementBoxes
  213.  
  214. to show (with a black frame), respectively hide, the corrected scaled
  215. and positioned bounding boxes.  The physical term "displacement" is
  216. used to remind you that these are boxes that displace other boxes,
  217. like TeX character boxes (see the TeXbook Chap 11), or indeed any TeX
  218. box. In case you make the graphics neatly fit into this displacement
  219. box the term "bounding" box would be justified, but just as for TeX
  220. characters, this is not necessarily so (cf. TeXbook p.63).   These
  221. commands are used intensively; some alternative older
  222. terminology (less recommended) can be found inside BoxedEPS.tex.
  223.  
  224.         Before any individual \BoxedEPSF{...} command one can insert
  225. commands to adjust the bounding box:
  226.  
  227.           \TrimBoundingBox{...}
  228.           \TrimTop{...}
  229.           \TrimLeft{...}
  230.           \TrimBottom{...}
  231.           \TrimRight{...}
  232.  
  233. Each takes a dimension argument referring to the PostScript (artist's)
  234. coordinates; with no scaling. Their names say what they do; just
  235. remember that they do NOT mask off part of the object when the box
  236. becomes too small; thus trimming is NOT "clipping".
  237.  
  238.         TeX is pretty good at shunting boxes around. But the command
  239. to *slide* an image around without changing its box nor shunting
  240. neighboring boxes is not readily accessible. So we provide:
  241.  
  242.           \hSlide{...}
  243.           \vSlide{...}
  244.  
  245. which respectively slide horizontally to the right and vertically down
  246. in dimension units of the TeX page, NOT the artist's page.
  247.  
  248.         A good order of steps for implanting a graphics object is to
  249. scale, then trim. Finally, slide, or shunt using TeX tools.
  250.  
  251.         By default, the box produced has a baseline (roughly!) through
  252. the middle like the letter "g"; it is constructed using TeX's \vcenter.
  253. This seems most agreeable in case of linefigures in text --- though
  254. mostly it does not matter. The 'height' mentioned above is the sum
  255. of the height and the depth of this box (with rare exceptions
  256. mentioned immediately below).
  257.  
  258.         The two other obvious choices of baseline are also available:
  259.  
  260.  --- \tBoxedEPSF{...} baseline at top as for washing hanging on a
  261. clothesline.
  262.  
  263.  --- \bBoxedEPSF{...} baseline at bottom as for trucks on a highway
  264.  
  265.         The default choice is
  266.  
  267.  --- \cBoxedEPSF{...} baseline centered as for khebabs on a skewer.
  268.  
  269. More precisely, it is centered on the "axis" of  mathematics in prose,
  270. which for  computer modern ten point system is 2.5pt above the baseline;
  271. this makes \cBoxedEPSF very convenient for insertion of small
  272. "linefigures" in prose; for example,  $\left(\BoxedEPSF{mylinefig 
  273. scaled 300}\right)$  should neatly fit "mylinefig" between 
  274. parentheses.  
  275.  
  276.      Beware however that TeX's refusal of negative heights or depths
  277. for boxes leads to surprising results with \cBoxedEPSF when very tiny
  278. linefigures occur (so tiny they do not reach the baseline). For example,
  279. if the scaling is zero, the height is the math axis height, and the depth
  280. is zero! If such extreme cases interest you, experiment with \hrule
  281. \cBoxedEPSF{myfig scaled 0} \hrule.  No such subtleties occur with
  282. \tBoxedEPSF and \bBoxedEPSF!
  283.  
  284.      You can change the default behavior to "baseline at top" (for example)
  285. by the command
  286.  
  287.          \let \BoxedEPSF=\tBoxedEPSF
  288.  
  289.  
  290.  
  291.  ****** Some file search trickery ******
  292.  
  293.         Ad hoc user macro definitions can perform file searchs that might
  294. at first sight seem beyond the scope of BoxedEPS.tex. The following
  295. comments respond to requests and suggestions of Douglas Gray-Stephens
  296. <gray@SCR.SLB.COM>.  
  297.  
  298.  1) Graphics objects to be reused can be macros and they need not be in
  299. the a specific directory. Since \SetEPSFDirectory respects TeX grouping,
  300. one can set out a definition as follows:
  301.  
  302.  \def\ourlogo#1{\bgroup\SetEPSFDirectory{<logopathname>}%
  303.        \BoxedEPSF{<logoname> scaled #1}\egroup}
  304.  
  305. Then one inserts the boxed logo using \ourlogo{<scale>}. The directory
  306. for EPSF's (if any) is momentarily changed but is the same before and
  307. after \ourlogo{<scale>} is used.
  308.  
  309.    If just a few graphics objects are to be reused often, economy
  310. and speed are best assured by storing the graphics object is a TeX box.
  311. Suppose for example that a logo is to be used on each page.  Then one
  312. can prepare the box by
  313.  
  314.  \newbox\logobox
  315.  \bgroup\SetEPSFDirectory{<logopathname>
  316.  \global\setbox\logobox=%
  317.     \hbox{\BoxedEPSF
  318.                {<logo file name> scaled <scale in mils>}}\egroup
  319.  \gdef\Logo{\copy\logobox}
  320.  
  321. Thereafter, \Logo places the logo very quickly and can be reused.
  322.  
  323.   2) It is possible to use simultaneously several graphics directories  by
  324. further exploiting TeX grouping.  Suppose, for example, that one wants
  325. an extra directory <graphpath> for scientific graphs.   Then one can
  326. define \BoxedGraph behaving just like \BoxedEPSF but always using
  327. directory <graphpathname>, as follows:
  328.  
  329.   \def\BoxedGraph#1{\bgroup\SetEPSFDirectory{<graphpathname>}%
  330.                           \BoxedEPSF{#1}\egroup}
  331.  
  332. \BoxedGraph is insensitive to occurences elsewhere of \SetEPSFDirectory.
  333.  
  334.   3) A useful special case of this approach gives a "wildcard" macro:
  335.  
  336.   \def\BoxedEPSFx#1{\bgroup\SetEPSFDirectory{}%
  337.                       \BoxedEPSF{#1}\egroup}
  338.  
  339. (This of course assumes one has used or will use
  340. \SetEPSFDirectory{<pathname>}, for otherwise \BoxedEPSFx will behave
  341. much like \BoxedEPSF.) One can use either "full" or "relative" file
  342. specifications in 
  343.  
  344.   \BoxedEPSFx{<filespec> [scaled <scale>]}
  345.  
  346. Here "full" means no separator out front, and "relative"
  347. means separator out front.  The separator is the character "/" for
  348. unix and ":" for Macintosh.   In the relative case, your current
  349. directory behaves as root; normally, this is the directory of
  350. the .tex file you launched.  
  351.  
  352.         Example for the Macintosh:
  353.  
  354.   \BoxedEPSFx{:art:monalisa.eps}
  355.  
  356. This searches in "art" a subdirectory of the default directory 
  357. for an EPS file called monalisa.eps.
  358.  
  359.  
  360.  
  361.  ****** Changing PostScript printer drivers ******
  362.  
  363.         The obstacle to portability is a lack of standard syntax for
  364. the \special commands; they vary from driver to driver.  This is
  365. overcome by using a local standard "fake special" within BoxedEPS.tex,
  366. and relating each driver to it.
  367.  
  368.         This local BoxedEPS.tex standard is a two-argument macro
  369.  
  370.            \EPSFSpecial#1#2
  371.  
  372. where #1 is <file spec> and #2 is <scale in mils>. A different
  373. definition is given for each driver. For example, for Textures, the
  374. user types
  375.  
  376.    \SetTexturesEPSFSpecial
  377.  
  378. and this package then institutes essentially the definition:
  379.  
  380.   \gdef\EPSFSpecial#1#2{\relax
  381.     \special{postscriptfile #1 scaled #2}}%
  382.  
  383. Actually, it is not quite that simple, because we allow decimal
  384. scaling factors like 726.7 (mils) while Textures requires integer
  385. values.
  386.  
  387.       Definitions for other drivers are being added:
  388.  
  389.   %% \SetTexturesEPSFSpecial  %% Textures 
  390.   %% \SetUnixCoopEPSFSpecial %% dvi2ps early unix 
  391.   %% \SetBechtolsheimDVI2PSEPSFSpecial and 
  392.   %% \SetBechtolsheimDVITPSEPSFSpecial %% by S.P.Bechtolsheim
  393.   %% \SetLisEPSFSpecial %% dvi2ps by Tony Lis
  394.   %% \SetRokickiEPSFSpecial  %% dvips by Tom Rokicki
  395.   %%  --- also for DVIReader, in DirectTeX by W. Ricken
  396.   %% \SetOzTeXEPSFSpecial  %% OzTeX (>=1.42) by Andrew Trevorrow
  397.   %% \SetPSprintEPSFSpecial %% PSprint by Andrew Trevorrow
  398.   %%  --- also for OzTeX versions <= 1.41 !!
  399.   %% \SetArborEPSFSpecial  %% ArborTeX DVILASER/PS
  400.   %% \SetClarkEPSFSpecial %% dvitops by James Clark
  401.   %% \SetDVIPSoneEPSFSpecial %% DVIPSONE of Y&Y 
  402.   %% \SetBeebeEPSFSpecial %% DVIALW by N. Beebe
  403.   %% \SetNorthlakeEPSFSpecial %% Northlake Software
  404.   %% \SetStandardEPSFSpecial %% Nonexistant: Placebo below
  405.  
  406.  
  407.    etc...  on demand --- see appendix.
  408.  
  409.  
  410.  ****** Compatibility with T. Rokicki's integration package ******
  411.  
  412.         For users of Rokicki's integration package epsf.tex attached to
  413. his C driver dvips (which has been widely ported), we support the
  414. following alternative syntax.
  415.  
  416.     \EPSFbox   or    \EPSFfile       equivalent to \bBoxedEPSF.
  417.     \EPSFxsize=126pt  equivalent to \ForceWidth{126pt}
  418.     \EPSFysize=76pt   equivalent to \ForceHeight{76pt}
  419.  
  420. This compatibility makes it straightforeward to move a manuscript
  421. prepared with the most basic features of epsf.tex to a TeX site with a
  422. driver other than dvips.
  423.  
  424.        Rokicki uses all-lowercase commands (epsf for EPSF); hence his
  425. epsf.tex can be loaded along with BoxedEPS.tex without conflict. If, on
  426. the other hand, you want BoxedEPS.tex to accept the lowercase syntax
  427. and execute the three commands in place of epsf.tex, you can
  428. type \EmulateRokicki.
  429.  
  430.  
  431.  ****** Known Problems ******
  432.  
  433.  1) The process of reading bounding boxes may prove annoyingly slow
  434. on smaller computers when inserts are numerous.  This problem will be
  435. lessened if you can make the "BoundingBox" comment one of the first
  436. in each PostScript file. The larger BoxedArt.tex package for Macintosh
  437. users provides a complete cure through use of a "graphics
  438. specification file", which can be read quickly.
  439.  
  440.  2) TeX permanently  uses up the string space needed to record the
  441. (full) name of each EPS file it opens.  If you are short on string space
  442. use succinct EPS file names like F1, F2, ... and put your TeX file in
  443. your graphics directory to make the default directory coincide with 
  444. the graphics directory. Then \BoxedEPSF{F1} will use up just two string
  445. characters.
  446.  
  447.  3) Textures/Macintosh: PostScript files that have a resource fork
  448. may upset the Textures driver.  Typically, nothing after the figure
  449. will print. This can be cured by deleting the resource fork.  For a
  450. PostScript file of Illustrator88, the preview graphics are in a PICT
  451. resource; try deleting all resources EXCEPT this PICT.
  452.  
  453.  
  454.  ****** Availability, and support ******
  455.  
  456.   ---  ftp 130.84.128.100 (alias rsovax.circe.fr); 
  457.  login: anonymous; password: <anything>; directory 
  458. [anonymous.siebenmann]; this is the master copy in 1992.
  459.  
  460.   ---  ftp  192.54.146.4 (matups.matups.fr); 
  461.  projected to be the master copy in 1993.
  462.  login: anonymous; password: <anything>.
  463.  
  464.   ---  ftp 129.69.1.12 (alias rusinfo.rus.uni-stuttgart.de);
  465.  login: anonymous; password: <anything>.
  466.  
  467.         Laurent Siebenmann
  468.         Mathematique, Bat. 425,
  469.         Univ de Paris-Sud,
  470.         91405-Orsay,
  471.         France
  472.  
  473.         siebenmann@LALCLS.IN2P3.FR
  474.         siebenmann@matups.matups.fr
  475.    
  476.   Fax number: 33-1-6941-6221
  477.  
  478.  
  479.                        REFERENCES
  480.  
  481.      The following may give you leads to alternative solutions.
  482.  
  483.  --- PSFIG a package by Trevor Darrell (for at least two drivers)
  484. available by anonymous ftp from whitechapel.media.mit.edu
  485. (18.85.0.124) in ./psfig or linc.cis.upenn.edu (130.91.6.8) in the
  486. directory ./dist/psfig.
  487.  
  488.  --- Merging PostScript Illustrations: Gerald Roylance 1987, 1989,
  489. see MIT AI Laboratory Working Paper 299a; this package supports dvi2ps
  490. and DVILASER/PS.
  491.  
  492.  --- dvips and epsf.tex by by T. Rokicki <rokicki@Neon.Stanford.EDU>
  493.  
  494.  --- Une meilleure integration du graphisme Macintosh, par Laurent
  495. Siebenmann, Cahiers GUTenberg, No. 4 (Dec 1989),  pages 29-38. The
  496. native Macintosh grapics norm is called PICT.  TeX has not been able
  497. to read PICT resources and files, as the resources are not files and
  498. the files are "binary". Nevertheless, good integration under Textures
  499. is possible with the help of a preprocessor "ArtDealer" and the notion
  500. of a "graphics description file". The strong points of this approach
  501. are speed and compactness. Portability poses some problems.  The
  502. package BoxedArt.tex, BoxedArt.doc, ArtDealer available (hopefully)
  503. from the same sources as this package combines both approaches.
  504.  
  505.  --- Nicolas Jungers <EDITEX@BUCLLN11.BITNET> two postings in the
  506. GUTenberg forum <GUT@FRULM11.BITNET> 9 Nov 90 and 17 Nov 90. [A good
  507. "do-it-yourself" kit!]
  508.  
  509.  --- Michael Ferguson <mike@inrs-telecom.uquebec.ca> espouses the
  510. \ForceHeight{...} approach in Cahiers GUTenberg, No. 3 (May 1989); it
  511. does not require TeX to read the EPS file.  N. Beebe indicates that his
  512. macros are available for DVIALW.
  513.  
  514.  
  515. APPENDIX:  A FIRST QUICK TEST OF BoxedEPS.tex
  516.  
  517.         Hopefully you have found your PostScript printer driver in the
  518. above list of \Set...EPSFSpecial commands.  In that case, try the
  519. following test to check that this package is working
  520.  
  521.  ------ cut here
  522.  
  523.  %% Test.tex  for Plain TeX; can be adapted to LaTeX, by puting 
  524.   %% everything from \input to ZZ into middle of a LateX file.
  525.  %\magnification=1200 %% uncomment later
  526.  \input BoxedEPS.tex
  527.  \Set...EPSFSpecial %%%% complete this line!!!!!!!!
  528.  \ShowDisplacementBoxes%\HideDisplacementBoxes %%alternatives
  529.  \null\vfill\vfill
  530.  AA\BoxedEPSF{gdisk.eps  scaled 500}ZZ
  531.  
  532.  \bye
  533.  
  534.  ------ cut here
  535.  %!PS-Adobe-2.0 EPSF-1.2
  536.  %%Title: gdisk.eps
  537.  %%Remark: A simple test file
  538.  %%Remark: DELETE SPACES BEFORE ALL %% (especially for Textures)
  539.  %%Pages: 0
  540.  %%BoundingBox: 216 216 432 432
  541.  %%EndComments
  542.  
  543.  72 72 scale     % units are now inches instead of big points
  544.  newpath
  545.    4.5 4.5 1.5 0 360 arc
  546.  closepath
  547.  0.9 setgray
  548.  fill
  549.  
  550.  ------ cut here
  551.         
  552.         The files Test.tex and gdisk.eps should be in the same
  553. directory.
  554.  
  555.         A grey disk should appear fitting snuggly between AA and ZZ.
  556. It should be neatly bounded by a square (the displacement box).
  557.  
  558.         Once this test is working you should be able to elaborate and
  559. test all features.
  560.  
  561.  
  562.  
  563.  APPENDIX: HOW TO GET SUPPORT FOR YOUR DRIVER
  564.  
  565.         To get support for your dvi to PostScript printer driver,
  566. please send the \special syntax required to insert a file myfile.eps
  567. with scaling 76 percent!
  568.  
  569.          For example, the answer for the ArborText DVILASER/PS driver
  570. was:
  571.  
  572.         \special{ps: epsfile myfile.eps 760}
  573.  
  574. And that was (almost) enough to let me program \SetArborEPSFSpecial.
  575.  
  576.         One more scrap of information is essential. Some \special's
  577. for EPSFs place the lower left corner of the (scaled) bounding box at
  578. the TeX insertion point, and others place the lower left corner of the
  579. artist's page at the insertion point. No other choice seems consistent
  580. with Knuth's recommendations in the TeXbook. Textures and ArborTeX
  581. belong to the first type, while OzTeX and Rokicki's dvips belong to
  582. the second. The first type of driver must read the "bounding box
  583. comment" in the EPS File header.  Please report on the basis of
  584. documentation and/or experimentation, which type is in question.  An
  585. experimental test routine is provided below.
  586.  
  587.         In general, some testing and/or driver documentation may be
  588. needed to clear up lingering questions. For example, are decimals
  589. allowed in in the scaling specification?  For ArborTeX I believe the
  590. answer is no.
  591.  
  592.         An information form is included below for those who would like
  593. to see BoxedEPS.tex adapted to another driver.
  594.  
  595.  
  596.      APPENDIX: AN INFORMATION KIT FOR OTHER DRIVERS
  597.  
  598.  -------------------------------cut
  599. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  600.  %%% spectest.tex  for  Plain  TeX
  601.  %%% Test to discover which point in
  602.   % the graphics page (plane) your \special
  603.   % command distinguishes and identifies to
  604.   % the TeX insertion point.
  605.   %
  606.   % --- Put the file gsquare.eps into the same folder as
  607.   % TeX and this testfile.  Hopefully this will make
  608.   % gsquare.eps accessible to the printer driver.
  609.   %
  610.   % --- Complete the \special{... gsquare.eps ...} command below
  611.   % as your driver documentation recommends for printing
  612.   % the EPSF file gsquare.eps ---  without any scaling,  or other
  613.   % refinement.  For example
  614.   % \special{ps: epsfile gsquare.eps 1000}
  615.   % is suitable for the ArborteX driver.
  616.   %
  617.   % --- Typeset this file
  618.   %
  619.   % --- Print the resulting .dvi file using your driver.
  620.   %
  621.   % INTERPRETATION:
  622.   %
  623.   % If the black box lies in the square, the
  624.   % distinguished point is the lower, left-hand corner of the
  625.   % PostScript bounding box.
  626.   %
  627.   % If the black box lies outside the square, the
  628.   % distinguished point is the lower, left-hand corner of the
  629.   % artist's page, i.e. the the PostScript origin.
  630.   %
  631.   % If the square is missing, your driver has probably not found
  632.   % the EPS file gsquare.eps, or you have formulated the \special
  633.   % command incorrectly.  Follow driver instructions more
  634.   % carefully.
  635.   %
  636.   % --- report results to Laurent Siebenmann
  637.   % <lcs@matups.matups.fr>
  638.   % on the special reply "reply.doc" form provided below.
  639.   %
  640.   %
  641.  
  642.  \null
  643.  \vfill
  644.  \vskip -1 in
  645.  \moveright 1 in \vbox{\hrule height 1 in width 1 in}
  646.  \vskip 1 in
  647.  \special{... gsquare.eps ...}%% please carefully adjust this
  648.  \eject
  649.  \bye
  650.  
  651.   %% end of spectest.tex
  652.  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  653.  
  654.  -------------------------------cut
  655. %!PS-Adobe-2.0 EPSF-1.2
  656.  %%Title: gsquare.eps
  657.  %%Remark: Another simple test file
  658.  %%Remark: DELETE SPACES BEFORE ALL %% (especially for Textures)
  659.  %%Pages: 0
  660.  %%BoundingBox: 216 216 432 432
  661.  %%EndComments
  662.  
  663.  72 72 scale     % units are now inches instead of big points
  664.  
  665.  newpath
  666.    3 3 moveto
  667.    3 6 lineto
  668.    6 6 lineto
  669.    6 3 lineto
  670.  closepath
  671.    0.8 setgray
  672.  fill
  673.  
  674.  -------------------------------cut
  675. %!PS-Adobe-2.0 EPSF-1.2
  676.  %%Title: heat.eps
  677.  %%Remark: Another simple test file
  678.  %%Remark: DELETE SPACES BEFORE ALL %% (especially for Textures)
  679.  %%Pages: 0
  680.  %%BoundingBox: 216 216 432 432
  681.  %%EndComments
  682.  
  683.  72 72 scale     % units are now inches instead of big points
  684.  newpath
  685.    4.5 4.5 1.5 0 360 arc
  686.  closepath
  687.  0.9 setgray
  688.  fill
  689.  
  690.  /Times-Italic findfont
  691.   .8 scalefont
  692.   setfont
  693.      3.75 4.3 moveto
  694.    0 setgray
  695.   (Heat) show
  696.  
  697.  -------------------------------cut
  698.  
  699.  
  700.  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  701.                   %%%  reply.doc  %%%
  702.  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  703.  INFORMATION FORM for adaptation of BoxedEPS.tex
  704.         to other "dvi-to-PostScript" printer drivers
  705.  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  706.  
  707.   Please provide information on the following items:
  708.  
  709.   --- Name and email address(es) of correspondent.
  710.  
  711.   --- Driver information :Name, version, date, copyright, vendor,
  712. computer(s) served, price etc.
  713.  
  714.   --- Syntax required to print the EPS File gsquare.eps scaled to 76
  715. percent using a command of the form \special{... gsquare.eps ...}. Is
  716. scaling to exactly 76.33 percent available?
  717.  
  718.  --- More info on \special.
  719.  
  720.  --- Location of the distinguished point.  (Report result of test in
  721. spectest.tex above).
  722.  
  723.  --- Source(s) of your EPSF files.
  724.  
  725.  --- Do you progam TeX? PostScript?
  726.  
  727.         A trial adaptation to your driver will be returned with
  728. BoxedEPS.tex. Thank you for cooperating!
  729.  
  730.         Laurent Siebenmann
  731.         Mathematique, Bat. 425,
  732.         Univ de Paris-Sud,
  733.         91405-Orsay,
  734.         France
  735.  
  736.         lcs@matups.matups.fr (best for big files)
  737.         LS@FrMaP711.bitnet (good for big files)
  738.         siebenma@FRLAL51.bitnet (reliable!)
  739.         siebenmann@LALCLS.decnet.cern.ch (reliable!)
  740.  
  741.   Fax number: 33-1-6941-6221
  742.  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  743.  
  744.  -------------------------------cut
  745.  
  746.  
  747.  
  748.  APPENDIX.  HOW ARE THE EPS GRAPHICS FILES BEING CREATED?
  749.  
  750.         While everyone admires PostScript graphics, few TeX users are
  751. entirely happy with their tools for producing the EPSF files. As soon
  752. as your integration problem has been disposed of, this one will be
  753. back to haunt you! Here are a few notes that may help:
  754.  
  755.  a) DrawOver 1.0 copyright Michael Everest 1986, is a converter to
  756. EPSF from the PICT graphics norm of the Macintosh, a norm for which
  757. there are many excellent drawing programs such as MacDraw. It is
  758. distributed with Illustrator 88 on the Mac. Its output has to be
  759. "validated" by passage through Illustrator. DrawOver is aging inasmuch
  760. as it handles the PICTs of more recent MacDraw versions less and less
  761. well.  One does best by using PICT files (re)generated by MacDraw
  762. versions anterior to MacDrawII.
  763.  
  764.  b) Illustrator 88 on the Mac by Adobe Corp is a MacDraw-like
  765. program that uses the EPSF norm.  Although in some respects rustic,
  766. it is favored by professionals since it is geared for highest
  767. quality output.
  768.  
  769.  c) Macintosh output to LaserWriter printers is PostScript code, and
  770. can be diverted into a file.  This file cannot be used as is, but a
  771. header file can be added which with a few other changes produces a
  772. (bulky) EPSF file.  See the macps converter of unix, or OzTeX or the
  773. $20 shareware Mac package AddLPrep copyright 1988 by SoftWare 101,
  774. 15151 Old Ranch road, Los Gatos CA.  The output is I believe
  775. equivalent at similar resolution to what the Macintosh-LaserWriter
  776. combination produces. However, starting from the same PICT file,
  777. method (a) often gives better results!
  778.  
  779.  d)  fig and xfig by Micah Beck, Cornell University
  780. <beck@cs.cornell.edu> are MacDraw-like programs for unix and unix
  781. X-windows, for which a translator transfig exists to EPSF norm.
  782.  
  783.  e)  Naked PostScript code. PostScript is a beautiful language, and the
  784. three Adobe manuals are very helpful.
  785.  
  786.  f)  Aldus Freehand on the Macintosh: see Berthold K.P. Horn's comments
  787. below.
  788.  
  789.  g)  Canvas on Macintosh in versions from 1991 (3.0) on will have the
  790. ability to save a file in EPS format (and also PICT and Illustrator 88
  791. formats etc., the most impressive list so far); published by Denaba
  792. Software. 
  793.  
  794.  h)  Classic MacDraw,  MacDraw Pro, indeed all versions from 1991 of
  795. MacDraw on Macintosh, on will have the ability to save a file in EPS
  796. as well as PICT format.  At the same time Apple is producing more and
  797. more non-PostScript printers...
  798.  
  799.             *****************************************
  800.  
  801.     I am sure it would be extremely useful if readers would extend and
  802. improve the above list!  Here is a first response from Berthold K.P.
  803. Horn:
  804.  
  805. (*) Aldus Freehand on the Mac is a more sophisticated tool for
  806. generating graphic illustrations than Adobe Illustrator.  Both are
  807. constrained to basically two-dimensional patterns.  Both can
  808. produce output in EPS form.  [[See the "export" menu item, and use
  809. the simple or Mac version of EPS format, not the IBMPC version that
  810. yields a partly binary file.  The Mac version includes a PICT
  811. resource containing a bitmap visible in the Textures preview.
  812. Aldus Freehand freehand also imports PICT resources via the Mac
  813. clipboard, and this provides an interesting alternative to
  814. DrawOver, the converter of Illustrator88.  This conversion
  815. sometimes handles MacDrawII PICT files better than DrawOver.
  816. Freehand, unlike Illustrator, has its own binary file format.]]
  817.  
  818. (*) Micrografx Designer on the PC is a more sophisticated tool for
  819. generating graphics illustrations than Adobe Illustrator. It is the
  820. PC's answer to `MacEnvy', since it provides a Windows based tool that
  821. is about as good as any on the Mac. Designer is also constrained to
  822. basically two-dimensional patterns.  It can produce output in EPS
  823. form.
  824.  
  825. (*) There are also CAD/CAM applications that run on high end PC's, Sun
  826. workstations that can handle `solid modelling' of three dimensional
  827. objects, but they are an order of magnitude more expensive, so few
  828. people have access to them.
  829.  
  830. (*) Illustrate on the Symbolics LispMachine was one of the first
  831. drawing programs and is still used quite a bit.  It can produce output
  832. in EPS form. Very similar features to the other 2-D illustration
  833. applications mentioned above.
  834.  
  835. (*) Screen Dumps.  Another useful source of graphic illustrations are
  836. screen dumps available on LispMachine, Windows on PC, and on Mac in
  837. EPS form.  OF course, they are in bitmap form so very limited in
  838. quality and not resolution-independent, but useful for illustrating
  839. program operations.
  840.  
  841. (*) Paint Programs.  On the Mac and the PC there are programs that
  842. instead of manipulating curves and areas work directly with bitmaps.
  843. The output can be in EPS form.  But same drawback as screendumps. Not
  844. used much.
  845.  
  846.         Max Calviani <fisica@astrpd.unipd.it>
  847. mentions
  848.  
  849. (**) Mongo or Supermongo ... superb ... produce a .ps file ... on
  850. vax/vms, also under Unix. They are copyrighted, Mongo costs approx 500
  851. USD, SuperMongo only 250 USD.
  852.  
  853.         Antonio Possolo in Seattle <antonio@atc.boeing.com> makes
  854. recommendations for unix:
  855.  
  856. An excellent tool to generate postscript figures in Unix is the S
  857. programming environment for data analysis and graphics,
  858. originally from AT&T Bell Labs, and S-PLUS, a superset [of S]
  859. from Statistical Sciences, Inc. (Seattle, Washington, USA). This
  860. is not a drawing tool in the sense of Adobe's Illustrator, or
  861. MacDraw: instead, it is driven by issuing drawing commands. S is
  862. described in R.A. Becker, J.M.  Chambers, & A.R. Wilks (1988)
  863. "The New S Language", Wadsworth & Brooks/Cole, and you will find
  864. there many examples of its capabilities to produce beautiful
  865. pictures (note the postscript() command, in particular, as means
  866. to generate postscript output). 
  867.